interface PersonInterface {
    name: string
    age: number
    codeIng: () => string
}

/*类实现接口*/
class Person implements PersonInterface {
    constructor(public name: string, public age: number) {
        this.name = name
        this.age = age
    }

    codeIng(): string {
        return '敲代码'
    }
}

const p: Person = new Person('陶', 22)

